#include "OpenMaxAlInterface.h"

COpenMaxAlInterface	g_OpenMaxAlInterface;

COpenMaxAlInterface::COpenMaxAlInterface()
//:gPlayerState(ePlayer_init)
{
	m_hVideoInvoke = (HMODULE) LoadLibrary(_T("OpenMaxAlCtrl.dll"));
	if(!m_hVideoInvoke)
	{
		return;
	}
	m_iInitMediaResource =			(PFN_INITMEDIARESOURCE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_InitMediaResource"));
	m_iUninitMediaResource =		(PFN_UNINITMEDIARESOURCE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_UninitMediaResource"));
	m_iCreateMediaPlayerObj =		(PFN_CREATEMEDIAPLAYEROBJ)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_CreateMediaPlayerObj"));
	m_iPlayFile =					(PFN_PLAYFILE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_PlayFile"));
	m_iStopFile =					(PFN_STOPFILE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_StopFile"));
	m_iPauseFile =					(PFN_PAUSEFILE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_PauseFile"));
	m_iSetVolume = 					(PFN_SETVOLUME)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_SetVolume"));
	m_iSetMute = 					(PFN_SETMUTE)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_SetMute"));
	m_iGetDuration =				(PFN_GETDURATION)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_GetDuration"));
	m_iGetPosition = 				(PFN_GETPOSITION)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_GetPosition"));
	m_iSetVideoFullScreen =			(PFN_SETVIDEOFULLSCREEN)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_SetVideoFullScreen"));
	m_iSetVideoOriginalScreen =		(PFN_SETVIDEOORIGINALSCREEN)(GetProcAddress(m_hVideoInvoke,L"OPENMAXAL_SetVideoOriginalScreen"));

}

COpenMaxAlInterface::~COpenMaxAlInterface()
{
}